package com.golte.exception;

import com.aliyun.oss.common.utils.StringUtils;

/**
 * @version V1.0
 * @description: 业务异常
 * @author: chenhuan
 * @date: 2021/5/26
 **/
public class BusinessException extends RuntimeException{
    private Integer code;
    public BusinessException() {
    }

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(Integer code ,String message){
        this(StringUtils.isNullOrEmpty(message)?String.valueOf(code):message);
        this.code=code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
